package org.enhance.web.common;

/**
 * @author JiangGengchao
 * @classname WebCommonConst
 * @description
 * @date 2022-02-15
 **/
public class WebCommonConst {
	private WebCommonConst() {
		throw new IllegalStateException("Utility class");
	}

	// ===================auth-key======================
	/** Auth key Authorization */
	public static final String KEY_TOKEN_HEADER = "Authorization";

	// ===================正则表达式======================
	/** 用户名 */
	public static final String PATTERN_USERNAME = "^[a-zA-Z0-9_-]{3,16}$";
	/** 用户名 */
	public static final String PATTERN_PASSWORD = "^(?=.*[a-zA-Z])(?=.*\\d)[A-Za-z\\d$@$!%*#?&]{6,}$";
	/** 身份证 */
	public static final String PATTERN_IDCARD = "^([1-9]\\d{16}[0-9Xx]|[1-9]\\d{14})$";
	/** 手机号 */
	public static final String PATTERN_PHONENUM = "^(13[0-9]|14[01,4-9]|15[0-3,5-9]|16[5-7]|17[0135678]|18[0-9]|19[189])\\d{8}$";
	/** 天 */
	public static final String PATTERN_DATE = "^20\\d{6}$";
	/** 月 */
	public static final String PATTERN_MONTH = "^20\\d{4}$";

	public static final String PATTERN_HTML_IMAGE = "<img[^>]+src\\s*=\\s*['\"]([^'\"]+)['\"][^>]*>";

	public static final String KEY_AESKEY = "aes.key";
}
